home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-10-26 | 458 b | 15 lines | [TEXT/$Tcl] |
-
-
- for_file var filename { code }
- This procedure implements a loop over the contents of a
- file. For each line in filename, it sets var to the
- line and executes code.
-
- The break and continue commands work as with foreach.
-
- For example, the command
-
- for_file line /etc/passwd {echo $line}
-
- would echo all the lines in the password file.
-